package com.ctu.gzero.formats
{
	import mx.messaging.channels.StreamingAMFChannel;
	
	public class CharacterFormat implements ICharacterFormat
	{
		private var _fontStyle:String;
		private var _fontFamily:String;	
		private var _typographicCase:String;	
		private var _digitWidth:String;	
		private var _ligatureLevel:String;	
		private var _trackingLeft:Object;	
		private var _baselineShift:Object;	
		private var _fontWeight:String;
		private var _fontLookup:String;	
		private var _renderingMode:String;	
		private var _fontSize:Object;
		private var _dominantBaseline:String;	
		private var _lineThrough:Object;
		private var _color:Object;	
		private var _digitCase:String;	
		private var _locale:String;	
		private var _trackingRight:Object;
		private var _textRotation:String;
		private var _textAlpha:Object;	
		private var _breakOpportunity:String;	
		private var _cffHinting:String;	
		private var _alignmentBaseline:String;
		private var _kerning:String;
  		private var _whiteSpaceCollapse:String;
  		private var _lineHeight:Object;
  		private var _textDecoration:String;
  		
  		private static var _fontStyleProperty:EnumStringProperty;
  		private static var _trackingRightProperty:NumberOrPercentProperty;
  		private static var _textRotationProperty:EnumStringProperty;
  		private static var _textAlphaProperty:NumberProperty;	
		private static var _breakOpportunityProperty:EnumStringProperty;	
		private static var _typographicCaseProperty:EnumStringProperty;
		private static var _cffHintingProperty:EnumStringProperty;	
		private static var _digitWidthProperty:EnumStringProperty;	
		private static var _fontFamilyProperty:StringProperty;
		private static var _ligatureLevelProperty:EnumStringProperty;
		private static var _baselineShiftProperty:NumberOrPercentOrEnumProperty;
		private static var _defaults:CharacterFormat;	
		private static var _trackingLeftProperty:NumberOrPercentProperty;
		private static var _nullCharacterFormat:ICharacterFormat;
		private static var _fontWeightProperty:EnumStringProperty;	
		private static var _dictionary:Dictionary;	
		private static var _fontLookupProperty:EnumStringProperty;	
		private static var _whiteSpaceCollapseProperty:EnumStringProperty;
		private static var _kerningProperty:EnumStringProperty;
		private static var _fontSizeProperty:NumberProperty;
		private static var _renderingModeProperty:EnumStringProperty;
		private static var _alignmentBaselineProperty:EnumStringProperty;
		private static var _lineHeightProperty:NumberOrPercentProperty;	
		private static var _textDecorationProperty:EnumStringProperty;
		private static var _dominantBaselineProperty:EnumStringProperty;
		private static var _colorProperty:UintProperty;
		private static var _lineThroughProperty:BooleanProperty;	
		private static var _scratch::CharacterFormat;
		private static var _description:Object;
		private static var _localeProperty:StringProperty;
		private static var _digitCaseProperty:EnumStringProperty;
		
		public function CharacterFormat(format:ICharacterFormat)
		{
			super();
			if(format)
			{
				copy(format);
			}
		}

		public function get textDecoration():String
		{
			return _textDecoration;
		}
		
		public function set textDecoration(textDecoration:String):void
		{
			var _obj:Object = _textDecorationProperty.setHelper(_textDecoration, textDecoration);
			var _s:String = (_obj==null) ? null : _obj as String;
			_textDecoration = s;
		}
		
		public function get dominantBaseline():String
		{
			return _dominantBaseline;
		}
		
		public function set dominantBaseline(dominantBaseline:String):void
		{
			var _obj:Object = _dominantBaselineProperty.setHelper(_dominantBaseline,dominantBaseline);
			var _s:String = (obj==null) ? null : _obj as String;			
			_dominantBaseline = _s;
		}
		
		public function get alignmentBaseline():String
		{
			return _alignmentBaseline;			
		}
		
		public function alignmentBaseline(alignmentBaseline:String):void
		{
			var _obj:Object = _alignmentBaselineProperty.setHelper(_alignmentBaseline,alignmentBaseline);
			var _s:String = (obj==null) ? null : _obj as String;			
			_alignmentBaseline = _s;
		}
		
		public function get textRotation():String
		{
			return _textRotation;
		}
		
		public function set textRotation(textRotation:String):void
		{
			var _obj:Object = _textRotationProperty.setHelper(_textRotation,textRotation);
			var _s:String = (obj==null) ? null : _obj as String;			
			_textRotation = _s;
		}
		
		public function get kerning():String
		{
			return _kerning;
		}
		
		public function set kerning(kerning:String):void
		{
			var _obj:Obect = _kerningProperty.setHelper(_kerning, kerning);			
			var _s:String = (_obj==null) ? null : _obj as String;			
			_kerning = _s;
		}
		
		public function get renderingMode():String
		{
			return _renderingMode;
		}
		
		public function set renderingMode(renderingMode:String):void
		{
			var _obj:Obect = _renderingModeProperty.setHelper(_renderingMode, renderingMode);			
			var _s:String = (_obj==null) ? null : _obj as String;			
			_renderingMode = _s;
		}
		
		public function get fontFamily():String
		{
			return _fontFamily;
		}
		
		public function set fontFamily(fontFamily:String):void
		{
			 var _obj:Object = _fontFamilyProperty.setHelper(_fontFamily,fontFamily);
			 var _s:String = (_obj==null) ? null; _obj as String;
			 _fontFamily = _s;
		}
		
		public function get breakOpportunity():String
		{
			return _breakOpportunity;
		}
		
		public function set breakOpportunity(breakOpportunity:String):void
		{
			 var _obj:Object = _breakOpportunityProperty.setHelper(_breakOpportunity,breakOpportunity);
			 var _s:String = (_obj==null) ? null; _obj as String;
			 _breakOpportunity = _s;
		}
		
		public function get digitCase():String
		{
			return _digitCase;
		}
		
		public function set digitCase(digitCase:String):void 
		{
			var _obj:Object = _digitCaseProperty.setHelper(_digitCase,digitCase);
			 var _s:String = (_obj==null) ? null; _obj as String;
			 _digitCase = _s;
		}
		
		public function get cffHinting():String
		{
			return _cffHinting;
		}
		
		public function set cffHingint(cffHinting:String):void
		{
			var _obj:Object = _cffHintingProperty.setHelper(_cffHinting, cffHinting);
			var _s:String = (_obj==null) ? null : _obj as Object;
			_cffHinting = _s;				
		}
		
		public function get digitWidth():String
		{
			return _digitWidth;
		}
		
		public function get locale():String
		{
			return _locale;
		}
		
		public function set locale(locale:String):void
		{
			var _obj:Object = _localeProperty.setHelper(_locale, locale);
			var _s:String = (_obj==null) ? null : _obj as Object;
			_locale = _s;
		}
		
		public function get trackingLeft():Object
		{
			return _trackingLeft;
		}
		
		public function set trackingLeft(trackingLeft:Object):void
		{
			_trackingLeft = _trackingLeftProperty.setHelper(_trackingLeft, trackingLeft);
		}
		
		public function get fontStyle():String
		{
			return _fontStyle;
		}
		
		public function set fontStyle(fontStyle:String):void
		{
			var _obj:Object = _fontStyleProperty.setHelper(_fontStyle,fontStyle);
			
			var _s:String = (_obj==null) ? null : _obj as String;
			
			_fontStyle = _s;
		}
		
		public function get color():Object
		{
			return _color;
		}
		
		public function set color(color:Object):void
		{
			_color = _colorProperty.setHelper(_color, color);
		}
		
		public function get trackingRight():Object
		{
			return _trackingRight;
		}
		public function set trackingRight(trackingRight:Object):void
		{
			_trackingRight = _trackingRightProperty.setHelper(_trackingRight,trackingRight);
		}
		
		public function get fontWeight():String
		{
			return _fontWeight;
		}
		
		public function set fontWeight(fontWeight:String):void
		{
			var _ojb:Object = _fontWeightProperty.setHelper(_fontWeight, fontWeight);
			var _s:Object = (_obj==null) ? null : _obj as String;
			_fontWeight = _s;
		}
		
		public function get fontLookup():String
		{
			return _fontLookup;
		}
		
		public function set fontLookup(fontLookup:String):void
		{
			var _obj:Object = _fontLookupProperty.setHelper(_fontLookup, fontLookup);
			var _s:String = (_obj==null) ? null : _obj as Sring;
			_fontLookup = _s;
		}
		
		public function get whiteSpaceCollapse():String
		{
			return _whiteSpaceCollapse;
		}
		
		public function set whiteSpaceCollapse(whiteSpaceCollapse:String):void
		{
			var _obj:Object = _whiteSpaceCollapseProperty.setHelper(_whiteSpaceCollapse, whiteSpaceCollapse);
			var _s:String = (_obj==null) ? null : _obj as Sring;
			_whiteSpaceCollapse = _s;
		}
		
		public function get fontSize():Object
		{
			return _fontSize;
		}
		
		public function set fontSize(fontSize:Object):void
		{
			_fontSize = _fontSizeProperty.setHelper(_fontSize, fontSize);			
		}
		
		public function get textAlpha():Object
		{
			return _textAlpha;
		}
		
		public function set textAlpha(textAlpha:Object):void
		{
			_textAlpha = _textAlphaProperty.setHelper(_textAlpha, textAlpha);
		}
		
		public function get typographicCase():String
		{
			return _typographicCase;
		}
		
		public function set typographicCase(typographicCase:String):void
		{
			var _obj:Object = _typographicCaseProperty.setHelper(_typographicCase, typographicCase);
			var _s:String = (_obj==null) ? null : _obj as Sring;
			_typographicCase = _s;
		}
		
		public function get lineThrough():Object
		{
			return _lineThrough;
		}
		
		public function set lineThrough(lineThrough:Object):void 
		{
			_lineThrough = _lineThroughProperty.setHelper(_lineThrough,lineThrough);
		}
		
		public function get ligatureLevel():String
		{
			return _ligatureLevel;
		}
		
		public function set ligatureLevel(ligatureLevel:String):void
		{
			var _obj = _ligatureLevelProperty.setHelper(_ligatureLevel, ligatureLevel);
			var _s:String = (_obj==null) ? null : _obj as String;
			_ligatureLevel = _s;
		}
		
		public function get lineHeight():Object
		{
			return _lineHeight;
		}
		
		public function set lineHeight(lineHeight:Object):void
		{
			_lineHeight = _lineHeightProperty.setHelper(_lineHeight, lineHeight);
		}
		
		public function get baselineShift():Object
		{
			return _baselineShift;
		}
		
		public function set baselineShift(baselineShift:Object):void
		{
			_baselineShift = _baselineShiftProperty.setHelper(_baselineShift,baselineShift);
		}
		
		public function hash(code:uint):uint
		{
			return 0;
		}
		
		public function concat(format:ICharacterFormat):void
		{
			color = _colorProperty.concatHelper(color, format.color) as Object;
		}
		
		public function set digitWidth(digitWidht:String):void
		{
			var _obj:Object = _digitWidthProperty.setHelper(_digitWidth, digitWidth);
			var _s:String = (obj==null) ? null : _obj as Object;
			_digitWidth = _s;
		}
		
		public static function get dominantBaselineProperty():EnumStringProperty
		{
			return _dominantBaselineProperty;
		}
		
		public static function get whiteSpaceCollapseProperty():EnumStringProperty
		{
			return _whiteSpaceCollapseProperty;
		}
		
		public static function get description():Object
		{
			return Property.shallowCopy(_description);
		}
		
		public static function get cffHintingProperty():EnumStringProperty
		{
			return _cffHintingProperty;
		}
		
		public static function get digitWidthProperty():EnumStringProperty
		{
			return _digitWidthProperty;
		}
	}
}